#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
int map[30][30] = { 0 };
int dp[30][30] = { 0 };
int main() {
    int Bx, By;
    int Mx, My;

    int d_x[] = { 1,-1,2,-2,1,-1,2,-2 };
    int d_y[] = { 2,-2,1,-1,-2,2,-1,1 };
    cin >> Bx >> By >> Mx >> My;
    Bx++, By++, Mx++, My++;
    for (int i = 0; i < 8; i++)
    {
        if (Mx + d_x[i] >= 0 && My + d_y[i] >= 0)
            map[Mx + d_x[i]][My + d_y[i]] = 1;
    }
    map[Mx][My] = 1;
    dp[0][1] = 1;

    for (int i = 1; i <= Bx; i++)
    {
        for (int j = 1; j <= By; j++)
        {
            if (map[i][j] == 1) dp[i][j] = 0;
            else dp[i][j] = dp[i][j - 1] + dp[i - 1][j];
        }
    }
    cout << dp[Bx][By];
}